<div class="row row-cards row-deck">
  <div class="col-12">
    <div class="card">
      <table class="table table-hover table-outline table-vcenter text-nowrap card-table">
        <thead>
          <tr>
            <th>名字</th>
            <th>是否使用</th>
            <th>排序</th>
            <th class="text-center">
              <a href="<%= new_admin_refund_reason_path %>">添加退款原因</a>
            </th>
          </tr>
        </thead>
        <tbody>
          <% @refund_reasons.each do |refund_reason| %>
          <tr>
            <td>
              <div><%= refund_reason.name %></div>
              <div class="small text-muted">
                <%= formattime(refund_reason.created_at, unit: "day") %>
              </div>
            </td>
            <td>
              <div>
                <%= refund_reason.published ? "是" : "否" %>
              </div>
            </td>
            <td>
              <div>
                <%= refund_reason.sort %>
              </div>
            </td>
            <td class="text-center">
              <div class="item-action dropdown">
                <a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fe fe-more-vertical"></i></a>
                <div class="dropdown-menu dropdown-menu-right">
                  <a href="<%= edit_admin_refund_reason_path(refund_reason) %>" class="dropdown-item"><i class="dropdown-icon fe fe-tag"></i> 修改 </a>
                  <%= link_to admin_refund_reason_path(refund_reason), class: "dropdown-item", method: :delete do %>
                    <i class="dropdown-icon fe fe-edit-2"></i> 删除 
                  <% end %>
                </div>
              </div>
            </td>
          </tr>
          <% end %>
        </tbody>
      </table>
      <div class="card-footer">
        <%= paginate @refund_reasons %>
      </div>
    </div>
  </div>
</div>